<template>
	<view class="container">
		<textarea v-model="userReason" placeholder="请输入退款原因..." />
		<button type="primary" @click="resonSubmit">提交</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				userReason:"",
			}
		},
		methods: {
			resonSubmit() {
				if (this.userReason) {
					uni.showToast({
						title: "提交成功",
						duration: 1000
					});
					this.userReason = "";
				} else {
					uni.showToast({
						title: "请说明您的理由",
						duration: 1000,
						icon: "error"
					});
				};
			}
		}
	}
</script>

<style scoped>
	.container {
		display: flex;
		flex-flow: column nowrap;
		justify-content: center;
		padding: 3vw;
		box-sizing: border-box;
	}

	textarea {
		border-radius: 10rpx;
		width: 100%;
		box-sizing: border-box;
		font-size: 0.9rem;
		background-color: rgba(235, 235, 235, 0.5);
		padding: 20rpx;
	}

	button {
		background-color: #007AFF;
		margin-top: 20rpx;
		width: 100%;
	}
</style>
